package poo.exo1;

public class CompteAction extends CompteSansLimite {

    private static final double versementInitial = 1000;
    private final double plafondCredit;

    public CompteAction(String nom, int numero, double solde, double plafond) throws MonException 
    {
            super(nom, numero, solde);
            
            if(solde < CompteAction.getVersementInitial()){
                    throw new MonException("Le solde initial doit etre superieur ou egal au versement initial ");
            }
            
            this.plafondCredit = plafond;
    }
    public double getPlafondCredit(){
            return this.plafondCredit;
    }
    public static double getVersementInitial() {
            return versementInitial;
    }
    @Override
    public String toString(){
            return super.toString();
    }
}
